<template>
  <div class="code-login">
    <el-form :model="form">
      <el-form-item class="-enter-x">
        <h1>手机登录</h1>
      </el-form-item>
      <el-form-item class="-enter-x">
        <el-input
          v-model="form.phone"
          class="login-input"
          :prefix-icon="Phone"
          placeholder="手机号码"
          clearable
        />
      </el-form-item>
      <el-form-item class="-enter-x">
        <CountDown v-model="form.code" />
      </el-form-item>
      <el-form-item class="-enter-x">
        <el-button
          class="flex-center w100 login-button"
          size="large"
          type="primary"
          >登录</el-button
        >
      </el-form-item>
      <el-form-item class="-enter-x">
        <el-button
          class="flex-center w100 login-button"
          size="large"
          type="default"
          plain
          @click="emit('back')"
          >返回</el-button
        >
      </el-form-item>
    </el-form>
  </div>
</template>

<script setup lang="ts">
import { reactive } from "vue";
import CountDown from "/@/components/CountDown/index.vue";
import { Phone } from "@element-plus/icons-vue";

const emit = defineEmits({
  back: null,
});
const form = reactive({
  phone: "",
  code: "",
});
</script>

<style scoped></style>
